package com.chenyaowei.product.domain;

import com.chenyaowei.common.annotation.Excel;
import com.chenyaowei.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.annotation.Transient;

import java.util.Arrays;
import java.util.List;

/**
 * spu信息对象 cyw_pro_spu_info
 *
 * @author 陈耀威
 * @date 2023-11-24
 */
public class CywProSpuInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** spu_id */
    private Long spuId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String spuName;

    /** 描述信息 */
    @Excel(name = "描述信息")
    private String spuDescription;

    /** 分类id */
    @Excel(name = "分类id")
    private Long catalogId;

    /** 品牌id */
    @Excel(name = "品牌id")
    private Long brandId;

    /** 上架状态[0 - 下架，1 - 上架] */
    @Excel(name = "上架状态[0 - 下架，1 - 上架]")
    private Integer publishStatus;

    @Transient
    private String catName;

    @Transient
    private String brandName;

    /** 祖宗分类IDs（含自身）用于前端组件回显 */
    @Transient
    private Long[] originIds;

    public Long[] getOriginIds() {
        return originIds;
    }

    public void setOriginIds(Long[] originIds) {
        this.originIds = originIds;
    }

    public String getCatName() {
        return catName;
    }

    public void setCatName(String catName) {
        this.catName = catName;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public void setSpuId(Long spuId)
    {
        this.spuId = spuId;
    }

    public Long getSpuId()
    {
        return spuId;
    }
    public void setSpuName(String spuName)
    {
        this.spuName = spuName;
    }

    public String getSpuName()
    {
        return spuName;
    }
    public void setSpuDescription(String spuDescription)
    {
        this.spuDescription = spuDescription;
    }

    public String getSpuDescription()
    {
        return spuDescription;
    }
    public void setCatalogId(Long catalogId)
    {
        this.catalogId = catalogId;
    }

    public Long getCatalogId()
    {
        return catalogId;
    }
    public void setBrandId(Long brandId)
    {
        this.brandId = brandId;
    }

    public Long getBrandId()
    {
        return brandId;
    }
    public void setPublishStatus(Integer publishStatus)
    {
        this.publishStatus = publishStatus;
    }

    public Integer getPublishStatus()
    {
        return publishStatus;
    }

    @Override
    public String toString() {
        return "CywProSpuInfo{" +
                "spuId=" + spuId +
                ", spuName='" + spuName + '\'' +
                ", spuDescription='" + spuDescription + '\'' +
                ", catalogId=" + catalogId +
                ", brandId=" + brandId +
                ", publishStatus=" + publishStatus +
                ", catName='" + catName + '\'' +
                ", brandName='" + brandName + '\'' +
                ", originIds=" + Arrays.toString(originIds) +
                '}';
    }
}
